import 'package:flutter/material.dart';
import 'dart:math' as math;

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Button',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyStatelessWidget(),
    );
  }
}

class MyStatelessWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    //定义文本样式

    return Scaffold(
      appBar: AppBar(
        title: Text("Button"),
      ),
      body: Column(
        children: <Widget>[/*
          Container(
            color: Colors.red,
            //X轴进行拉升
            child: Transform(transform: new Matrix4.skewY(0.5),
              child:
              Container(
                color: Colors.blue,
                child: Text("SkewY"),),
              )
          ),*/
          /*Container(
              color: Colors.red,
              //Y轴进行拉升
              child: Transform(transform: new Matrix4.skewX(0.5),
                child:
                Container(
                  color: Colors.yellow,
                  child: Text("SkewX"),),
              )
          ),*/
          /*Container(
              color: Colors.red,
              //放大,但是所占的空间不变
              child: Transform.scale(
                scale: 2,
                child:
                Container(
                  color: Colors.yellow,
                  child: Text("scale"),),
              )
          ),*/
          /*Container(
              color: Colors.red,
              width: 300,
              height: 300,
              //旋转
              child: Transform.rotate(
                angle: math.pi*3/4,
                child:
                Container(
                  color: Colors.yellow,
                  child: Text("scale"),),
              )
          ),*/
          Container(
              color: Colors.red,
              width: 300,
              height: 300,
              //平移
              child: Transform.translate(
                offset: Offset(50,40),
                child:
                Container(
                  color: Colors.yellow,
                  child: Text("scale"),),
              )
          )
        ],
      ),
    );
  }

}
